import tkinter as tk

root = tk.Tk()
root.geometry('300x300')

sb = tk.Scrollbar(root,orient=tk.HORIZONTAL)
sb2 = tk.Scrollbar(root,orient=tk.VERTICAL)

sb.pack(side=tk.BOTTOM,fill=tk.X)
sb2.pack(side=tk.RIGHT, fill=tk.Y)

lb = tk.Listbox(root, xscrollcommand=sb.set,yscrollcommand=sb2.set)

for i in range(100):
    lb.insert('end', str(i + 1000000000000000000000000000000000000))

lb.place(x=50,y=50)
def aa():
    d = lb.get(1,10)
    print(d)

tk.Button(command=aa).pack()

sb.config(command=lb.xview)
sb2.config(command=lb.yview)

tk.mainloop()